import Actions from './actions';
import { SystemPointsConfigQueryResponse } from 'api/SystemPointsConfigController';

export interface IMainReducer {
  isReady: boolean;
  isLoading?: boolean;
  isClick?: boolean;
  community: Array<{ communityId: string; communityName: string; courierStationVOS: Array<{ courierStationId: string; courierStationName: string; }> }>;
  showCommunity: boolean;
  communityId: string;
  communityName: string;
  communityAddress: string;
  whoMotherFuckerOpenTheMap: 'community' | 'courierStation' | '';
  courierStation: Array<{ courierStationId: string; courierStationName: string; }>;
  showCourierStation: boolean;
  courierStationId: string;
  courierStationName: string;
  showDeliveryTime: boolean;
  startTime: string;
  endTime: string;
  selectedTime: string;
  addressSelect: any;
  requirements: string;
  showRequirements: boolean;
  imgUrl: string;
  paymentMethod: 'wechat' | 'wallet';
  points: {
    totalPoint: number;
    maxPoint: number;
    usePoint: number;
    pointConfig: SystemPointsConfigQueryResponse;
    deductionAmountOfPoints: number;
    integralDeductionSwitch: boolean;
  };
  deliveryFee: number;
  orderInfo: any;
  phone: string;
  accountBalanceTotal: number;
  isPayPwdValid: boolean;
  showSettingPassword: boolean;
  isForgetPassword: boolean;
  code: string;
  showSettingPasswordNext: boolean;
  password: string;
  customerId: string;
  showPasswordPayment: boolean;
  passwordError: boolean;
  openid: string;
  showExpenseDetails: boolean;
  timeRaise: number | string;
  basicServiceFee: number | string;
  showRule: boolean;
  rule: { basicServicePoints: number, durationFees: Array<{ beginHour: string; endHour: string; timeIntervalPoints: number }> };
  showPointsRule: boolean;
  showUserAgreement: boolean;
  userAgreement: boolean;
}

export type ActionType = ReturnType<typeof Actions>;
export type IAllReducerProps = {
  main: IMainReducer;
  [name: string]: any;
};

export type IProps = IAllReducerProps & ActionType;

//自定义
export type IInfoProps = {};
export type IInfoState = {};
